#include<stdio.h>
int main(){
    fputs("hello world!\n",stdout);
    FILE* file = fopen("test.txt","a+");
    if(file == NULL){
        perror("file: ");
        return -1;
    }
    fputs("\nhello world!\n",file);
    fclose(file);
    return 0;
}